package cn.pfz.statusnum;

import lombok.Getter;

@Getter
public enum AppointmentstatusEnum {

    PEND(0, "待确认"), PERFORM(1, "履行中"), CONSUME(2, "消费中"), FINISH(3, "归档"), FAILURE(4, "废弃");

    private Integer value;
    private String name;

    AppointmentstatusEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static String getName(Integer value) {
        AppointmentstatusEnum[] values = values();
        for (AppointmentstatusEnum appointmentstatusEnum : values) {
            if (appointmentstatusEnum.value.equals(value)) {
                return appointmentstatusEnum.name;
            }
        }
        return null;
    }

}
